# Maintainer: Alex McGrath <amk@amk.ie>
pkgname=fcft
pkgver=3.1.7
pkgrel=0
pkgdesc="Simple library for font loading and glyph rasterization using FontConfig, FreeType and pixman"
url="https://codeberg.org/dnkl/fcft"
license="MIT"
arch="all"
makedepends="
	meson
	scdoc
	fontconfig-dev
	freetype-dev
	harfbuzz-dev
	pixman-dev
	tllist-dev
	utf8proc-dev
	"
checkdepends="check-dev font-dejavu" # tests require a font to be installed
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/dnkl/fcft/archive/$pkgver.tar.gz"
builddir="$srcdir/fcft"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsvg-backend=nanosvg \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
e862856dfb85c5df85f9f32dce8ed9e7fed8b3dc8435876994f53d276a2c597d0cee0b4fbcbb62362a3771e9ca82c49db95da989404d0c8aa5f604dd50c79075  fcft-3.1.7.tar.gz
"
